﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content3" ContentPlaceHolderID="loginHolder" runat="server">
<%if (HttpContext.Current.Application["current_user"] != null)
  { %>
  <%Html.RenderPartial("UserStateControl", HttpContext.Current.Application["current_user"]); %>
<%}
  else
  { %>
  <%=Html.ActionLink("注册", "Index", "User")%>
  <%=Html.ActionLink("登录", "Login", "User") %>
<%} %>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    列表
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table>
        <%foreach (XianboSite.Models.Live item in (List<XianboSite.Models.Live>)ViewData["lives"])
          { %>
        <tr>
            <td>
                <%=Html.Label(item.UserID) %>
            </td>
            <td>
                <%=Html.ActionLink(item.LiveName, "Index","Live",new {ID = item.LiveID},null)%>
            </td>
        </tr>
        <%} %>
    </table>
</asp:Content>
